<?php
$dsn="mysql:Server=127.0.0.1;dbname=blog";
$db= new PDO($dsn, "root", "123456");
$db ->exec("set names utf8mb4");

$sql ="select * from article order by article_id desc";
$result =$db->query($sql);
$articleList =$result->fetchAll(PDO::FETCH_ASSOC);